-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List tornado and traitlets as dependencies explicitly, and cleanup unreachable code #457
Conversation
9ac91e5
to
26b59d8
Compare
# for tornado 4.5.x compatibility | ||
if version_info[0] == 4: | ||
conn = PingableWSClientConnection( | ||
io_loop=ioloop.IOLoop.current(), | ||
compression_options={}, | ||
request=request, | ||
on_message_callback=on_message_callback, | ||
on_ping_callback=on_ping_callback, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cleaned up now that we know we required tornado 5.0 via jupyter server 1.0.0+.
# resolver= parameter requires tornado >= 6.3. Only pass it if needed | ||
# (for Unix socket support), so older versions of tornado can still | ||
# work otherwise. | ||
kwargs = {"resolver": resolver} if resolver else {} | ||
conn = PingableWSClientConnection( | ||
request=request, | ||
compression_options={}, | ||
on_message_callback=on_message_callback, | ||
on_ping_callback=on_ping_callback, | ||
max_message_size=getattr( | ||
websocket, "_default_max_message_size", 10 * 1024 * 1024 | ||
), | ||
subprotocols=subprotocols, | ||
**kwargs, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was just indentation changes by no longer nesting under an else
clause.
We reference tornado and traitlets directly from our source code, so we should surface those dependecies.
We require
jupyter-server>=1.0
, which depend ontornado>=5.0
andtraitlets>=4.2.1
, so I'm adding our dependency on tornado and traitlets explicitly in this project, putting their lower bounds to those versions - and adding a test to verify our test suite works against those versions.For reference, note that
jupyter-server==1.1.0
released four years ago requires tornado 6.1, so I figure its safe to assume we can bump these notably without issues in the future.This enables me to better reason about #448, as its changing something that is passed to tornado, and tornado's behavior may differ slightly between versions.